#include("../../comm/ListHead.html")
<div class="layui-fluid layui-anim layui-anim-scale">
    <div class="layui-row layui-col-space5">
        <div class="layui-col-md12 height-auto">
            <div class="layui-card">
                <div class="card-search SearchTable">
                    <p style="float:right">
                        <input type="text" id="test_title" lay-verify="required" placeholder="标题" autocomplete="off"
                               class="table-search-text width200">
                        <button class="layui-btn layui-btn-warm layui-btn-sm" lay-event="DoSearch">
                            搜索
                        </button>
                    </p>
                    <div class="layui-tab layui-tab-brief">
                        <ul class="layui-tab-title" style="width: 300px;float:left">
                            <li class="layui-this">收信箱<span class="layui-badge">99</span>
                            </li>
                            <li lay-event="Test">发件箱</li>
                            <li lay-event="Test">回收站<span class="layui-badge-dot layui-bg-orange"></span>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="layui-card-body"></div>
                <table class="layui-hide" id="table_1" lay-filter="table_1"></table>
                <script type="text/html" id="table_1_bar_title">
                    <div class="layui-btn-container" style="float:left;">
                        <button class="layui-btn layui-btn-sm layui-btn-primary layui-border-green">
                            <i class="layui-icon">&#xe9aa;</i> 清空
                        </button>
                        <button class="layui-btn layui-btn-sm layui-btn-primary layui-border-blue">
                            <i class="layui-icon">&#xe9aa;</i> 删除
                        </button>
                        <button class="layui-btn layui-btn-sm layui-btn-primary layui-btn-disabled" permission-more="layui-border-orange" lay-event="Test">
                            <i class="layui-icon">&#xe9aa;</i> 全部已读
                        </button>
                        <button class="layui-btn layui-btn-sm layui-btn-primary layui-btn-disabled" permission-one="layui-border-red" lay-event="Test">
                            <i class="layui-icon">&#xe9aa;</i> 单选启用
                        </button>
                    </div>
                    <div id="bar_desc"></div>
                </script>

            </div>
        </div>
    </div>
</div>
<script language="JavaScript">

    layui.use(['myTable', 'table', 'form', 'util', 'myTool'], function () {
        table = layui.table, form = layui.form, myTool = layui.myTool;
        tableindex = layui.myTable.render({
            url: 'TestTable2ListDataApi', skin: 'line'
            , title: '系统日志数据表'
            , cols: [[
                {type: 'checkbox', width: 36, fixed: true}
                , {field: 'test_id', title: '', width: 40, align: 'center', templet: '<div><i class="layui-icon" style="font-size: 24px; color: #1E9FFF;">&#xe67d;</i></div>'}
                , {field: 'test_title', title: '标题', templet: '<div>{{ d.test_title }}<i class="layui-icon" style="font-size: 20px; color: red;">&#xe6c6;</i></div>'}
                , {field: 'log_result_str', title: '', align: 'center', width: 70, templet: '<div><span class="layui-badge {{ d.log_result_color }}">{{ d.test_img_str }}</span></div>'}
                , {field: 'pub_date_str', title: '时间', align: 'left', width: 160}
            ]]
            , page: true
            , limit: 10
        });


        //头工具栏事件
        table.on('toolbar(table_1)', function (obj) {
            var days = layui.$(this).attr("value");
            myTool.toolbar(this, obj, {
                Test: function () {
                    top.layer.alert("测试");
                }
            });
        });

        layui.util.event("lay-event", {
            DoSearch: function () {
                tableindex.reload({
                    where: {
                        like: {login_id: $("#login_id").val(), log_ip: $("#log_ip").val(), log_iparea: $("#log_iparea").val()}
                    }
                    , page: {curr: 1}
                });
            }
            , Test: function () {
                layer.msg("test");
            }
        });
    });
</script>
</body>
</html>